<a href="javascript:void(0)" onclick="UgovorPasteTok(this);" class="copypaste" title="Paste"><img src="gui/icons/paste.gif" alt="paste" /></a>
<a href="javascript:void(0)" onclick="UgovorCopyTok(this);" class="copypaste" title="Copy"><img src="gui/icons/copy.gif" alt="copy" /></a>
<h3 artid="{{$stavka_tok_art_id}}" class="stavka_item_h3">{{$stavka_head_name}}</h3>
<!-- MATERIJAL -->
<div class="itdata_item" style="width:30%;">
	<fieldset style="padding:0px; margin-bottom:5px;">
		<legend>
			<span>materijal:</span>
			<input type="button" class="novi" onclick="ugovorAddMaterijal(this)" />
		</legend><br clear="all" />
		<ul class="materijalList">
			{{%loop start mat_id}}
			<li>
				<input type="hidden" name="mat_data_{{$mat_id}}" value="{{$mat_data}}" />
				<input type="button" title="obriši" onclick="if(confirm('Da li želite da obrišete materijal?')){this.parentNode.parentNode.removeChild(this.parentNode)}" class="delete" />
				<input type="button" title="izmeni" onclick="ugovorEditMaterijal(this)" class="edit" />
				<span class="mat_date">{{$mat_usao}}</span>
				<span class="mat_upotrebljiv" upotrebljiv="{{$mat_upotrebljiv}}"></span>
				<span class="mat_vrste">{{$mat_vrste}}</span>
				<span class="mat_tip_ulaza">{{$mat_tip_ulaza}}</span>
				<br clear="all" />
				<img src="gui/icons/napomena.gif" align="left" style="float:left" />
				<span class="mat_napomena" style="float:left; clear:none"><pre style="float:left">{{$mat_napomena}}</pre></span><br clear="all" />
			</li>
			{{%loop end}}
		</ul>
	</fieldset>
	<label class="left" style="width:auto; margin-left:5px;" for="mat_ocekuje_{{$itdt_id}}">materijal se očekuje:</label>
	<input type="text" class="dateInput" name="mat_ocekuje_{{$itdt_id}}" id="mat_ocekuje_{{$itdt_id}}" value="{{$mat_ocekuje}}" />
	<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
	<br clear="all" />
	
	<input onclick="var wd=this.nextSibling.nextSibling; wd.style.display=wd.style.display=='block'?'none':'block';" type="button" name="www_data_{{$itdt_id}}" id="www_data_{{$itdt_id}}" class="wwwData" value="podaci za internet" style="margin-top:15px; margin-left:30px;" />
	<div class="wwwDataContainer area">
		<a title="Close" class="close" href="javascript:void(0)" onclick="this.parentNode.style.display='none'">&nbsp;</a>
		<h2>Podaci za internet</h2>
		
		<fieldset>
			<legend>period trajanja <input style="float:none; margin:0px 5px;" type="button" class="novi" onclick="addInternetDataPeriodi(this)" /></legend>
			<ul class="internet_data_periodi">
				{{%loop start period_num}}
				<li>
					<a href="javascript:void(0)" onclick="removeInternetDataPeriodi(this.parentNode)"><img src="gui/icons/delete.gif" border="0" /></a>
					<label class="left" for="internet_data_od_{{$itdt_id}}_{{$period_num}}">od:</label>
					<input value="{{$period_start}}" type="text" name="internet_data_od_{{$itdt_id}}_{{$period_num}}" id="internet_data_od_{{$itdt_id}}_{{$period_num}}" class="dateInput" />
					<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
					
					<label class="left second" for="internet_data_do_{{$itdt_id}}_{{$period_num}}">do:</label>
					<input value="{{$period_end}}" type="text" name="internet_data_do_{{$itdt_id}}_{{$period_num}}" id="internet_data_do_{{$itdt_id}}_{{$period_num}}" class="dateInput" />
					<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
				</li>
				{{%loop end}}
			</ul>
		</fieldset>
		
		<fieldset>
			<legend>ključne reči</legend>
			<textarea name="kwords_{{$itdt_id}}" id="kwords_{{$itdt_id}}">{{$kwords}}</textarea>
		</fieldset>
		
		<fieldset>
			<legend>profil</legend>
			
			<label class="left" for="profile_tip_{{$itdt_id}}">tip:</label>
			<select name="profile_tip_{{$itdt_id}}" id="profile_tip_{{$itdt_id}}">
				{{%loop start profil_tip_id}}
				<option value="{{$profil_tip_id}}" {{$profil_tip_selected}}>{{$profil_tip_name}}</option>
				{{%loop end}}
			</select>
			
			<label class="left second" for="profile_start_{{$itdt_id}}">od:</label>
			<input value="{{$profile_start}}" type="text" class="dateInput" name="profile_start_{{$itdt_id}}" id="profile_start_{{$itdt_id}}" />
			<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
			
			<label class="left second" for="profile_end_{{$itdt_id}}">do:</label>
			<input value="{{$profile_end}}" type="text" class="dateInput" name="profile_end_{{$itdt_id}}" id="profile_end_{{$itdt_id}}" />
			<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
			
			<label class="left second" for="profile_logo_{{$itdt_id}}">{{$logo_pre}}</label>
			<input value="{{$profile_logo}}" pre="{{$logo_pre}}" type="text" name="profile_logo_{{$itdt_id}}" id="profile_logo_{{$itdt_id}}" style="width:180px;" onchange="this.value=trim(this.value); LoadRSDoc('ugovori.php?a=checkLogo&ugoid={{$ugovor_id}}&pre={{$logo_pre}}&logo='+escape(this.value),'afterCheckLogo(\'profile_logo_{{$itdt_id}}\')')" />
			<input title="Pogledajte logo..." type="button" class="preview" onclick="previewImage(this.previousSibling.previousSibling)" />
			<br clear="all" />
			<label class="left srp" for="profile_text_srp_{{$itdt_id}}">tekst:</label>
			<textarea name="profile_text_srp_{{$itdt_id}}" id="profile_text_srp_{{$itdt_id}}">{{$profile_srp}}</textarea>
			<label class="left eng" for="profile_text_eng_{{$itdt_id}}">tekst:</label>
			<textarea name="profile_text_eng_{{$itdt_id}}" id="profile_text_eng_{{$itdt_id}}">{{$profile_eng}}</textarea>
		</fieldset>
		
		<fieldset>
			<legend>baner</legend>
			<label class="left" for="baner_tip_{{$itdt_id}}">tip:</label>
			<select name="baner_tip_{{$itdt_id}}" id="baner_tip_{{$itdt_id}}">
				<option value="-1">---</option>
				{{%loop start baner_tip_id}}
				<option value="{{$baner_tip_id}}" {{$baner_tip_selected}}>{{$baner_tip_name}}</option>
				{{%loop end}}
			</select>
			
			<label class="left second" for="baner_start_{{$itdt_id}}">od:</label>
			<input value="{{$baner_start}}" type="text" class="dateInput" name="baner_start_{{$itdt_id}}" id="baner_start_{{$itdt_id}}" />
			<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
			
			<label class="left second" for="baner_end_{{$itdt_id}}">do:</label>
			<input value="{{$baner_end}}" type="text" class="dateInput" name="baner_end_{{$itdt_id}}" id="baner_end_{{$itdt_id}}" />
			<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
			
			<label class="left second" for="baner_name_{{$itdt_id}}">{{$baner_pre}}</label>
			<input value="{{$baner_name}}" pre="{{$baner_pre}}" type="text" name="baner_name_{{$itdt_id}}" id="baner_name_{{$itdt_id}}" style="width:180px;" />
			<input title="Pogledajte baner..." type="button" class="preview" onclick="previewImage(this.previousSibling.previousSibling)" />
		</fieldset>
		
		<fieldset>
			<legend>prezentacija</legend>
				<label class="left" for="test_adresa_{{$itdt_id}}">test adresa:</label><input value="{{$www_test}}" type="text" name="test_adresa_{{$itdt_id}}" id="test_adresa_{{$itdt_id}}" style="width:200px;" />
				<label class="left second" for="final_adresa_{{$itdt_id}}">konačna adresa:</label><input value="{{$www_final}}" type="text" name="final_adresa_{{$itdt_id}}" id="final_adresa_{{$itdt_id}}" style="width:200px;" />
		</fieldset>
		<fieldset style="float:left">
			<legend>hosting - Yellow Pages</legend>
			
			<label class="left" for="host_yp_start_{{$itdt_id}}">od:</label>
			<input value="{{$host_yp_start}}" type="text" class="dateInput" name="host_yp_start_{{$itdt_id}}" id="host_yp_start_{{$itdt_id}}" />
			<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
			
			<label class="left second" for="host_yp_end_{{$itdt_id}}">do:</label>
			<input value="{{$host_yp_end}}" type="text" class="dateInput" name="host_yp_end_{{$itdt_id}}" id="host_yp_end_{{$itdt_id}}" />
			<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
		</fieldset>
		<fieldset style="float:left">
			<legend>hosting - internet provajder</legend>
			
			<label class="left" for="host_provider_{{$itdt_id}}">provajder:</label>
			<select name="host_provider_{{$itdt_id}}" id="host_provider_{{$itdt_id}}">
				{{%loop start provider_id}}
				<option value="{{$provider_id}}" {{$provider_selected}}>{{$provider_name}}</option>
				{{%loop end}}
			</select>
			
			<label class="left" for="host_start_{{$itdt_id}}">od:</label>
			<input value="{{$host_start}}" type="text" class="dateInput" name="host_start_{{$itdt_id}}" id="host_start_{{$itdt_id}}" />
			<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
			
			<label class="left second" for="host_end_{{$itdt_id}}">do:</label>
			<input value="{{$host_end}}" type="text" class="dateInput" name="host_end_{{$itdt_id}}" id="host_end_{{$itdt_id}}" />
			<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
		</fieldset>
		
		<br clear="all" />
		<fieldset>
			<legend>domen</legend>
			
			<label class="left" for="domen_name_{{$itdt_id}}">naziv:</label>
			<input value="{{$domen_name}}" type="text" name="domen_name_{{$itdt_id}}" id="domen_name_{{$itdt_id}}" />
			
			<label class="left second" for="domen_start_{{$itdt_id}}">od:</label>
			<input value="{{$domen_start}}" type="text" class="dateInput" name="domen_start_{{$itdt_id}}" id="domen_start_{{$itdt_id}}" />
			<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
			
			<label class="left second" for="domen_end_{{$itdt_id}}">do:</label>
			<input value="{{$domen_end}}" type="text" class="dateInput" name="domen_end_{{$itdt_id}}" id="domen_end_{{$itdt_id}}" />
			<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
		</fieldset>
	</div>
	<input onclick="var bd=this.nextSibling.nextSibling; bd.style.display=bd.style.display=='block'?'none':'block';" type="button" name="book_data_{{$itdt_id}}" id="book_data_{{$itdt_id}}" class="bookData" value="podaci za knjigu" style="margin-top:15px; padding-left:22px;" />
	<div class="bookDataContainer area">
		<a title="Close" class="close" href="javascript:void(0)" onclick="this.parentNode.style.display='none'">&nbsp;</a>
		<h2>Podaci za knjigu</h2>
		
		<fieldset>
			<legend>
				<label for="multi_{{$itdt_id}}">Multiplicirani oglas</label>
				<input type="checkbox" name="multi_{{$itdt_id}}" id="multi_{{$itdt_id}}" {{$multi_checked}}/>
			</legend>
			<br clear="all" />
			<label class="left" for="multi_num_pages_{{$itdt_id}}">strana:</label>
			<input value="{{$multi_num_pages}}" type="text" name="multi_num_pages_{{$itdt_id}}" id="multi_num_pages_{{$itdt_id}}" style="width:20px;" maxlength="3" />
			
			<label class="left second" for="multi_start_del_{{$itdt_id}}">od delatnosti:</label>
			<select name="multi_start_del_{{$itdt_id}}" id="multi_start_del_{{$itdt_id}}">
				{{%loop start del_id}}
				<option value="{{$del_id}}" title="{{$del_id}}" {{$del_selected}}>{{$del_name}}</option>
				{{%loop end}}
			</select>
		</fieldset>
		<label class="left" for="brands_{{$itdt_id}}">Brendovi:</label>
		<textarea name="brands_{{$itdt_id}}" id="brands_{{$itdt_id}}" style="width:400px;">{{$brands}}</textarea>
		<br clear="all" />
		<br clear="all" />
		<fieldset>
			<legend>
				<label for="multi_{{$itdt_id}}">Linkovi</label>
				<input type="button" value="+" class="add" onclick="UgovorAddLink(this)" />
			</legend>
			<ol id="linkovi_{{$itdt_id}}">
				<li id="template" style="clear:both">
					<select>
						<option value="-1">---</option>
						{{%loop start link_del_id}}
						<option value="{{$link_del_id}}">{{$link_del_name}}</option>
						{{%loop end}}
					</select>
					<input type="button" onclick="var len=this.parentNode.parentNode.getElementsByTagName('li'); len=len.length; if(len>1){this.parentNode.parentNode.removeChild(this.parentNode)}" value="-" />
				</li>
				{{%loop start link_dels}}
				<li style="clear:both">
					<select>
						{{$link_dels}}
					</select>
					<input type="button" onclick="var len=this.parentNode.parentNode.getElementsByTagName('li'); len=len.length; if(len>1){this.parentNode.parentNode.removeChild(this.parentNode)}" value="-" />
				</li>
				{{%loop end}}
			</ol>
		</fieldset>
	</div>
</div>

<!-- KOMITENT -->
<div class="itdata_item" style="width:39%">
	<fieldset>
		<legend><span>komitent:</span></legend>
		
		<label style="width:70px;" class="left" for="komitent_poslato_{{$itdt_id}}">poslato:</label>
		<input type="text" class="dateInput" name="komitent_poslato_{{$itdt_id}}" id="komitent_poslato_{{$itdt_id}}" value="{{$komitent_poslato}}" />
		<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
		
		<label style="width:70px" class="left" for="komitent_obavesten_{{$itdt_id}}">obavešten:</label>
		<input type="text" class="dateInput" name="komitent_obavesten_{{$itdt_id}}" id="komitent_obavesten_{{$itdt_id}}" value="{{$komitent_obavesten}}" />
		<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
		
		<br clear="all" />
		<label style="width:70px;" class="left" for="komitent_potvrdjeno_{{$itdt_id}}">potvrđeno:</label>
		<input type="text" class="dateInput" name="komitent_potvrdjeno_{{$itdt_id}}" id="komitent_potvrdjeno_{{$itdt_id}}" value="{{$komitent_potvrda}}" />
		<input type="button" class="datePicker" onclick="displayDatePicker(this.previousSibling.previousSibling.id,this)" />
		
		<label style="width:70px" class="left" for="komitent_obnova_{{$itdt_id}}">obnova:</label>
		<input type="checkbox" name="komitent_obnova_{{$itdt_id}}" id="komitent_obnova_{{$itdt_id}}" {{$komitent_obnova}}/>
	</fieldset>
	<textarea style="height:44px" onfocus="this.value=this.value.replace(/^specijalni zahtevi\.+$/,'')" onblur="if(trim(this.value).length==0){this.value='specijalni zahtevi...'}" name="spec_zah_{{$itdt_id}}" id="spec_zah_{{$itdt_id}}">{{$ugovor_tok_speczah}}</textarea>
	<textarea style="height:70px; margin-top:0px;" onfocus="this.value=this.value.replace(/^napomena\.+$/,'')" onblur="if(trim(this.value).length==0){this.value='napomena...'}" name="napomena_{{$itdt_id}}" id="napomena_{{$itdt_id}}">{{$ugovor_tok_nap}}</textarea>
</div>

<!-- ACTIONS -->
<div class="itdata_item" style="width:31%;">
	<fieldset style="padding:0px;">
		<legend>
			<span>akcije dizajnera:</span>
			<input type="button" class="novi" onclick="ugovorAddAction(this)" />
		</legend>
		<br clear="all" />
		<ul class="actionsList">
			{{%loop start act_num}}
			<li style="{{$act_done}}">
				<input type="hidden" name="act_data_{{$act_num}}" value="{{$act_data}}" />
				<input type="button" title="delete" onclick="this.parentNode.parentNode.removeChild(this.parentNode)" class="delete" />
				<input type="button" title="delete" onclick="ugovorEditAction(this)" class="edit" />
				<span class="act_editor">
					{{$imanap_start}}<img src="gui/icons/napomena.gif" align="right" napomena="{{$napomena}}" onclick="alert(this.getAttribute('napomena'))" />{{$imanap_end}}
					{{$act_editor}}
				</span>
				<span class="act_date">{{$act_out}} - {{$act_in}}</span>
				<span class="act_designer_note"><pre>{{$act_designer_note}}</pre></span>
				<span class="act_designer">{{$act_designer}}</span>
			</li>
			{{%loop end}}
		</ul>
	</fieldset>
</div>